﻿<UserControl x:Class="ScrumFactory.Tasks.TasksList"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:props="clr-namespace:ScrumFactory.Tasks.Properties"
             
             xmlns:sys="clr-namespace:System;assembly=mscorlib"

             xmlns:SF="clr-namespace:ScrumFactory;assembly=ScrumFactory"
             xmlns:SF_Helpers="clr-namespace:ScrumFactory.Windows.Helpers;assembly=ScrumFactory.Windows.Helpers"
             xmlns:SF_DD="clr-namespace:ScrumFactory.Windows.Helpers.DragDrop;assembly=ScrumFactory.Windows.Helpers"
             xmlns:SF_Adorners="clr-namespace:ScrumFactory.Windows.Helpers.Adorners;assembly=ScrumFactory.Windows.Helpers"             
             xmlns:SF_Comp="clr-namespace:ScrumFactory.Composition;assembly=ScrumFactory.Composition" 
             xmlns:SF_Helpers_Ext="clr-namespace:ScrumFactory.Windows.Helpers.Extensions;assembly=ScrumFactory.Windows.Helpers"             
             xmlns:KExt="clr-namespace:System.Windows.KExtensions;assembly=System.Windows.KExtensions"
             
             SF_Comp:CommandBehavior.RoutedEventName="Loaded"
             SF_Comp:CommandBehavior.TheCommandToRun="{Binding OnLoadCommand}"


             
             xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
             
             x:Name="thisView"
             
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.InputBindings>
        <KeyBinding Key="Enter" Command="{Binding CreateTaskCommand}"/>
        <KeyBinding Key="C" Modifiers="Control" Command="{Binding CopyTasksCommand}"/>
        <KeyBinding Key="V" Modifiers="Control" Command="{Binding PasteTasksCommand}"/>
        <KeyBinding Key="T" Modifiers="Control" Command="{Binding SelectAllTasksCommand}"/>        
    </UserControl.InputBindings>

    <UserControl.Resources>


        <Style x:Key="PostItTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Margin" Value="0"/>
            <Setter Property="Padding" Value="0"/> 
            <Setter Property="KExt:SpellCheck.YOffset" Value="1"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Background">
                        <Setter.Value>
                            <SolidColorBrush Color="White" Opacity="0.3"/>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>            
        </Style>
        
        <DataTemplate x:Key="PostItDataTemplate">            
            <SF_Adorners:SurroundBorderAdorner
                x:Name="itemBorder"
                Style="{StaticResource PostItBorder}"
                 Margin="2,18,2,0" 
                Width="150" MaxWidth="200" MinHeight="130" VerticalAlignment="Top"
                BorderThickness="2" >
                <Grid IsEnabled="{Binding CanEditThisTask}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="auto"/>
                    </Grid.RowDefinitions>
                    <Viewbox HorizontalAlignment="Center" VerticalAlignment="Center" Grid.RowSpan="3" Width="80" Height="80" Margin="0,-80,0,0"  >                        
                        <Path Style="{StaticResource ClockPath_VM}"  VerticalAlignment="Center" HorizontalAlignment="Center" />
                    </Viewbox>                    
                    <Image DataContext="{Binding HasArtifact}" Style="{StaticResource HasArtifactImage}" HorizontalAlignment="Right" VerticalAlignment="Top" Grid.RowSpan="3"/>
                    <TextBox
                        Grid.Row="0"
                        Style="{StaticResource PostItTextBox}"                        
                        Text="{Binding Task.TaskName, UpdateSourceTrigger=PropertyChanged}" 
                        VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                        MaxLength="300"                              
                        SF_Helpers_Ext:TextBoxExtension.IsFocused="{Binding PostItTaskNameTextBoxFocus}"
                        SF_Comp:CommandBehavior.RoutedEventName="LostFocus"
                        SF_Comp:CommandBehavior.TheCommandToRun="{Binding ChangeTaskNameCommand}" 
                        KExt:SpellCheck.IsEnabled="True" KExt:SpellCheck.XOffset="2" />
                    <DockPanel Grid.Row="1" HorizontalAlignment="Stretch">
                        <TextBox
                            SF_Helpers_Ext:TextBoxExtension.AutoSelectOnFocus="True"
                            SF_Helpers_Ext:TextBoxExtension.NumericJumper="0.5"
                            SF_Helpers_Ext:TextBoxExtension.IsFocused="{Binding PostItPlannedHoursTextBoxFocus}"
                          
                            Text="{Binding Task.PlannedHours, StringFormat='{}{0:0.#}', UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Bottom"
                            SF_Comp:CommandBehavior.RoutedEventName="LostFocus" FontWeight="Bold"
                            SF_Comp:CommandBehavior.TheCommandToRun="{Binding ChangePlannedHoursCommand}"
                            MaxLength="4"  DockPanel.Dock="Right" TextAlignment="Right"  >
                            <TextBox.Style>
                                <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource PostItTextBox}">
                                    <Setter Property="TextBox.FontSize" Value="{StaticResource SmallFontSize}"/>
                                    <Setter Property="TextBox.MinWidth" Value="13"/>
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding Task.Status}" Value="0">
                                            <Setter Property="TextBox.FontSize" Value="{StaticResource BigFontSize}"/>
                                            <Setter Property="TextBox.MinWidth" Value="30"/>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </TextBox.Style>
                        </TextBox>
                        <TextBlock Text="/" VerticalAlignment="Bottom" DockPanel.Dock="Right">
                            <TextBlock.Style>
                                <Style TargetType="{x:Type TextBlock}">                                    
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding Task.Status}" Value="0">
                                            <Setter Property="TextBlock.Visibility" Value="Collapsed"/>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </TextBlock.Style>
                        </TextBlock>
                        <TextBox 
                           
                            SF_Helpers_Ext:TextBoxExtension.AutoSelectOnFocus="True"
                            SF_Helpers_Ext:TextBoxExtension.NumericJumper="0.5"
                        
                            Text="{Binding Task.EffectiveHours, StringFormat='{}{0:0.#}', UpdateSourceTrigger=PropertyChanged}" MinWidth="30"
                            SF_Comp:CommandBehavior.RoutedEventName="LostFocus"
                            SF_Comp:CommandBehavior.TheCommandToRun="{Binding ChangeEffectiveHoursCommand}"
                            MaxLength="4" TextAlignment="Right" DockPanel.Dock="Right" >
                            <TextBox.Style>
                                <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource PostItTextBox}">                                    
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding Task.Status}" Value="0">
                                            <Setter Property="TextBox.Visibility" Value="Collapsed"/>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </TextBox.Style>
                        </TextBox>
                        
                        <Image DataContext="{Binding Task.TaskType}" Style="{StaticResource TaskTypeOnPostItImage}" DockPanel.Dock="Left" HorizontalAlignment="Left"/>
                        <Image DataContext="{Binding IsCanceled}" Style="{StaticResource IsTaskCanceledImage}" DockPanel.Dock="Left" HorizontalAlignment="Left"/>
                        
                    </DockPanel>
                    <ComboBox
                        Grid.Row="2"                                                         
                        SF_Comp:CommandBehavior.RoutedEventName="SelectionChanged"
                        SF_Comp:CommandBehavior.TheCommandToRun="{Binding ChangeTaskAssigneeCommand}"
                        IsEnabled="{Binding CanChangeAssignee}"                                                
                        Style="{StaticResource TaskAssigneeComboBox}"
                        SelectedValuePath="MemberUId" SelectedValue="{Binding TaskAssigneeUId}"                                                
                        ItemsSource="{Binding ElementName=thisView, Path=Model.ProjectMembers, Converter={StaticResource TaskAssigneeCollectionConverter}}">                      
                        <ComboBox.GroupStyle>
                            <GroupStyle HidesIfEmpty="True" ContainerStyle="{StaticResource TaskAssigneeGroupStyle}"/>
                        </ComboBox.GroupStyle>
                    </ComboBox>                  
                </Grid>
                
                <SF_Adorners:SurroundBorderAdorner.LeftControl>
                    
                        <Button
                        DataContext="{Binding ElementName=itemBorder, Path=DataContext}"
                        Margin="0,0,-10,0"
                        Style="{StaticResource MoveItemLeftButton}"
                        VerticalAlignment="Center" 
                        ToolTip="{Binding TaskMoveLeftToolTip}"
                        Command="{Binding MoveTaskLeftCommand}" />
                    
                        
                </SF_Adorners:SurroundBorderAdorner.LeftControl>
                <SF_Adorners:SurroundBorderAdorner.RightControl>
                    <Grid>
                        <Button                             
                            VerticalAlignment="Top" Margin="-10,0,0,0"                            
                            Command="{Binding DataContext.TrackTaskCommand, ElementName=itemBorder}"
                            ToolTip="{x:Static props:Resources.startClock_tooltip}">
                            <Image Source="/Images/Toolbar/clock.png" Width="32" Height="32"/>
                            <Button.Style>
                                <Style TargetType="Button" BasedOn="{StaticResource CleanButton}">
                                    <Setter Property="Visibility" Value="Collapsed"/>
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding DataContext.CanTrackTask, ElementName=itemBorder}" Value="True">
                                            <Setter Property="Visibility" Value="Visible"/>
                                        </DataTrigger>                                        
                                    </Style.Triggers>
                                </Style>
                            </Button.Style>
                        </Button>
                        <Button                                                                                                 
                                VerticalAlignment="Top" Margin="-10,0,0,0" 
                                Command="{Binding DataContext.AssignTaskToMeCommand, ElementName=itemBorder}" 
                                ToolTip="{x:Static props:Resources.assign_task_to_me}">
                                <ContentControl Style="{StaticResource MemberImageNoIndicatorControlStyle}" DataContext="{Binding Model.SignedMemberUId, ElementName=thisView}"
                                        Width="32" Height="32"/>
                                                        
                            <Button.Style>
                                <Style TargetType="Button" BasedOn="{StaticResource CleanButton}">
                                    <Setter Property="Visibility" Value="Collapsed"/>
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding DataContext.TaskAssigneeUId, ElementName=itemBorder}" Value="{x:Null}">
                                            <Setter Property="Visibility" Value="Visible"/>
                                        </DataTrigger>
                                        <DataTrigger Binding="{Binding Model.IsSignedMemberAtProject, ElementName=thisView}" Value="False">
                                            <Setter Property="Visibility" Value="Collapsed"/>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </Button.Style>
                        </Button>
                        <Button VerticalAlignment="Center"
                            DataContext="{Binding ElementName=itemBorder, Path=DataContext}"
                            Margin="-10,0,0,0"
                            Style="{StaticResource MoveItemRightButton}"
                        
                            ToolTip="{Binding TaskMoveRightToolTip}"
                            Command="{Binding MoveTaskRightCommand}" />

                    </Grid>



                </SF_Adorners:SurroundBorderAdorner.RightControl>
                <SF_Adorners:SurroundBorderAdorner.BottomControl>
                    <DockPanel Background="Transparent">
                        <TextBlock DockPanel.Dock="Left" Margin="0,0,0,0" >
                            <Hyperlink 
                                Command="{Binding Model.ShowDetailWindowCommand, ElementName=thisView}"
                                CommandParameter="{Binding ElementName=itemBorder, Path=DataContext}">
                                <Run Text="{x:Static props:Resources.Details}" FontSize="{StaticResource SmallFontSize}"/>
                            </Hyperlink>
                        </TextBlock>

                        
                      <Button 
                                DataContext="{Binding ElementName=itemBorder, Path=DataContext}"
                                DockPanel.Dock="Left" Margin="8,-10,0,0"
                                Style="{StaticResource CleanButton}"
                                Command="{Binding CopyTaskTrackIdCommand}" 
                                ToolTip="{x:Static props:Resources.copy_track_info_to_clipboard}">
                            <Image Source="/Images/Buttons/tag.png" Width="22" Height="22"/>
                        </Button>
                        <!--
                        <Button 
                                DataContext="{Binding ElementName=itemBorder, Path=DataContext}"
                                DockPanel.Dock="Left" Margin="8,0,0,0"
                                Style="{StaticResource CleanButton}"
                                Command="{Binding ShowRepositoryLogCommand}" 
                                ToolTip="{x:Static props:Resources.Change_log}">
                            <Image Source="/Images/Toolbar/tail.png" Width="16" Height="16"/>
                        </Button>-->



                        <Button
                            DockPanel.Dock="Right"                            
                            DataContext="{Binding ElementName=itemBorder, Path=DataContext}"
                            Style="{StaticResource RemoveActionButton}" Margin="0,-15,-8,0"
                            HorizontalAlignment="Right"
                            Command="{Binding CancelTaskCommand}"
                            ToolTip="{x:Static props:Resources.Cancel_task}"/>
                    </DockPanel>                    
                </SF_Adorners:SurroundBorderAdorner.BottomControl>
                
                                
            </SF_Adorners:SurroundBorderAdorner> 
        </DataTemplate>

        <Style x:Key="TagListBox" TargetType="ListBox">
            <Setter Property="SelectedItem" Value="{Binding FilterTag}"/>
            <Setter Property="ItemsSource" Value="{Binding TaskTags}"/>
            <Setter Property="SF_Helpers_Ext:ListSelectionBehavior.ClickSelection" Value="True"/>
            <Setter Property="ItemContainerStyle" Value="{StaticResource NoHoverListBoxItem}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        
                        
                            <ScrollViewer                                 
                                Style="{StaticResource ScrollViewerNoBars}" Margin="0" Focusable="false" MaxWidth="400">
                                <StackPanel IsItemsHost="True" Orientation="Horizontal"/>
                            </ScrollViewer>

                  
                        
                    </ControlTemplate>
                    
                </Setter.Value>
            </Setter>
            <Setter Property="ItemTemplate">
                <Setter.Value>                    
                    <DataTemplate>
                        <Border 
                            VerticalAlignment="Stretch" Margin="2,0,2,0" Padding="2,0,2,0"
                            BorderThickness="1" BorderBrush="{StaticResource TagBorderBrush}"
                            ToolTip="{Binding Name}">
                            <Grid>
                                <TextBox 
                                    Style="{StaticResource ClickToEditTextBox}" MaxWidth="140" Margin="0"
                                    Text="{Binding Name}" VerticalAlignment="Center"
                                    TextWrapping="NoWrap" IsReadOnly="{Binding Model.CanNotAddTags, ElementName=thisView}"
                                    IsHitTestVisible="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}"
                                    SF_Comp:CommandBehavior.RoutedEventName="LostFocus"
                                    SF_Comp:CommandBehavior.TheCommandToRun="{Binding ElementName=thisView, Path=Model.UpdateTagCommand}"
                                    SF_Comp:CommandBehavior.TheCommandParameter="{Binding .}"
                                    Padding="0" FontSize="{StaticResource SmallFontSize}" Foreground="White" />
                                <Button                                                    
                                    Width="16" Height="16" Margin="0,0,-8,0" IsTabStop="False"
                                    Command="{Binding Model.RemoveTagCommand, ElementName=thisView}" CommandParameter="{Binding .}"
                                    HorizontalAlignment="Right" VerticalAlignment="Top">                                    
                                    <Button.Style>
                                        <Style TargetType="Button" BasedOn="{StaticResource RemoveActionButton}">
                                            <Setter Property="Visibility" Value="Collapsed"/>
                                            <Style.Triggers>                                                
                                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="True">
                                                    <Setter Property="Visibility" Value="Visible"/>
                                                </DataTrigger>
                                                <Trigger Property="IsEnabled" Value="False">
                                                    <Setter Property="Visibility" Value="Collapsed"/>
                                                </Trigger>
                                            </Style.Triggers>
                                        </Style>
                                    </Button.Style>
                                </Button>

                                <!--<TextBlock Text="{Binding OpenTasksCount}" Padding="2,0,2,0" 
                                           Background="White" Foreground="{StaticResource TagBrush}" 
                                           FontSize="{StaticResource TinyFontSize}"
                                           HorizontalAlignment="Right" VerticalAlignment="Bottom">
                                    <TextBlock.Style>
                                        <Style TargetType="TextBlock">
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding OpenTasksCount}" Value="0">
                                                    <Setter Property="Visibility" Value="Collapsed"/>
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </TextBlock.Style>
                                </TextBlock>-->


                            </Grid>
                            
                            <Border.Style>
                                <Style TargetType="Border" BasedOn="{StaticResource MouseOverBorder}">
                                    <Setter Property="Background" Value="Transparent"/>                                    
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="True">
                                            <Setter Property="Background" Value="{StaticResource TagBrush}"/>                                            
                                        </DataTrigger>                                        
                                    </Style.Triggers>
                                </Style>
                            </Border.Style>
                        </Border>
                    </DataTemplate>                    
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <DataTrigger Binding="{Binding TaskTags.Count}" Value="0">
                    <Setter Property="Visibility" Value="Collapsed"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
        
    </UserControl.Resources>

    <SF_Helpers:PanelLayout Title="{Binding PanelName}"                                     
                            SF_Helpers_Ext:SearchBoxExtension.SearchBox="{Binding ElementName=searchTextBox}">

        <!-- TOOLBAR -->
        <SF_Helpers:PanelLayout.Toolbar>
            <Grid  VerticalAlignment="Center">
              
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
                
                <ToolBar Grid.Row="0" HorizontalAlignment="Stretch">

                    <MenuItem Grid.Column="0" Header="{x:Static props:Resources.Join}" Command="{Binding ShowJoinDialogCommand}"
                              Style="{StaticResource Toolbar_MenuItemStyleHideWhenDisabled}">
                        <MenuItem.Icon>
                            <Image Source="/Images/ToolBar/joinProject.png" Width="32" Height="32" Stretch="Uniform"/>
                        </MenuItem.Icon>
                    </MenuItem>

                    <MenuItem
                        IsEnabled="{Binding IsSignedMemberAtProject}"
                        Header="{x:Static props:Resources.New_task}" Focusable="False"
                        Command="{Binding SetNewTaskTypeCommand}">
                        <MenuItem.CommandParameter>
                            <sys:Int16>1</sys:Int16>
                        </MenuItem.CommandParameter>
                    <MenuItem.Icon>
                            <Image Source="/Images/ToolBar/add.png" Width="32" Height="32" Stretch="Uniform"/>
                    </MenuItem.Icon>                
                        <MenuItem.Style>
                            <Style BasedOn="{StaticResource Toolbar_MenuItemStyleHideWhenDisabled}" TargetType="MenuItem">
                                <Style.Triggers>
                                    <Trigger Property="MenuItem.IsPressed" Value="True">
                                        <Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=addTextBox}"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </MenuItem.Style>
                    </MenuItem>

                    <MenuItem
                        IsEnabled="{Binding IsSignedMemberAtProject}"
                        Command="{Binding SetNewTaskTypeCommand}"
                        Header="{x:Static props:Resources.New_bug}" Focusable="False">
                        <MenuItem.CommandParameter>
                            <sys:Int16>4</sys:Int16>
                        </MenuItem.CommandParameter>
                        <MenuItem.Icon>
                            <Image Source="/Images/toolbar/Bug.png" Width="32" Height="32" Stretch="Uniform"/>
                        </MenuItem.Icon>
                        <MenuItem.Style>
                            <Style BasedOn="{StaticResource Toolbar_MenuItemStyleHideWhenDisabled}" TargetType="MenuItem">
                                <Style.Triggers>
                                    <Trigger Property="MenuItem.IsPressed" Value="True">
                                        <Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=addTextBox}"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </MenuItem.Style>
                    </MenuItem>

                    <MenuItem Command="{Binding ChangeListModeCommand}" Focusable="False">
                        <MenuItem.Style>
                            <Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource Toolbar_MenuItemStyle}">
                                <Setter Property="Header" Value="{x:Static props:Resources.List}"/>
                                <Setter Property="Icon">
                                    <Setter.Value>
                                        <Image Source="/Images/ToolBar/listView.png" Width="32" Height="32" Stretch="Uniform"/>
                                    </Setter.Value>
                                </Setter>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding ListMode}" Value="1">
                                        <Setter Property="Header" Value="{x:Static props:Resources.Post_it}"/>
                                        <Setter Property="Icon">
                                            <Setter.Value>
                                                <Image Source="/Images/ToolBar/PostItView.png" Width="32" Height="32" Stretch="Uniform"/>
                                            </Setter.Value>
                                        </Setter>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </MenuItem.Style>
                    </MenuItem>

                    <MenuItem 
                       Focusable="False"
                        IsCheckable="True" IsChecked="{Binding ReplanItemWhenChanged}" IsEnabled="{Binding CanReplanItemWhenChanged}"
                              Header="{x:Static props:Resources.Replan_item}" ToolTip="{x:Static props:Resources.Replan_item_tooltip}"
                              Style="{StaticResource Toolbar_MenuItemStyleHideWhenDisabled}">
                        <MenuItem.Icon>
                            <Image Source="/Images/ToolBar/planning.png" Width="32" Height="32" Stretch="Uniform"/>
                        </MenuItem.Icon>
                    </MenuItem>


                    <MenuItem Header="{x:Static props:Resources.Start_clock}" Command="{Binding StartStopClockCommand}">
                        <MenuItem.Icon>
                            <Border CornerRadius="4" BorderThickness="1" Padding="3">
                                <TextBlock Text="{Binding ClockTime}" FontSize="{StaticResource ReallyBigFontSize}" Foreground="{StaticResource ToolBarItemBrush}" FontWeight="Bold"/>
                                <Border.Style>
                                    <Style>
                                        <Setter Property="Border.BorderBrush" Value="Transparent"/>
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding IsClockTimeOver}" Value="True">
                                                <Setter Property="Border.Background" Value="{StaticResource AlertBackgroundBrush}"/>
                                                <Setter Property="Border.BorderBrush" Value="{StaticResource AlertBrush}"/>
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </Border.Style>
                            </Border>
                        </MenuItem.Icon>
                    </MenuItem>

                    <MenuItem 
                       Focusable="False"
                        Command="{Binding AddNewTagCommand}"
                        Header="{x:Static props:Resources.New_tag}" ToolTip="{x:Static props:Resources.New_tag_tooltip}"
                        Style="{StaticResource Toolbar_MenuItemStyleHideWhenDisabled}">
                        <MenuItem.Icon>
                            <Image Source="/Images/ToolBar/reviewTag.png" Width="32" Height="32" Stretch="Uniform"/>
                        </MenuItem.Icon>
                    </MenuItem>

                    <ListBox Style="{StaticResource TagListBox}"/>




                </ToolBar>

                
                
                

                <Grid x:Name="newItemPanel"
                            Grid.ColumnSpan="2" Grid.Row="1"
                            Style="{StaticResource NewItemPanelAutoClose}">
                    <DockPanel VerticalAlignment="Top" HorizontalAlignment="Stretch">
                        <TextBlock Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.New_task}" VerticalAlignment="Center" DockPanel.Dock="Left"/>
                        <ComboBox
                        SelectedValue="{Binding NewTaskType, Converter={StaticResource EnumToShortConverter}, ConverterParameter={x:Type SF:TaskTypes}}"                        
                        Width="200" BorderBrush="{StaticResource TextBoxBackgroundBrush}"  VerticalAlignment="Center" DockPanel.Dock="Left"
                        ItemsSource="{Binding Source={StaticResource TaskTypeList}}">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <Grid  HorizontalAlignment="Stretch">
                                        <Image Style="{StaticResource TaskTypeImage}" HorizontalAlignment="Left" />
                                        <TextBlock Text="{Binding ., Converter={StaticResource LocalizeConverter}}" HorizontalAlignment="Stretch" Margin="30,0,0,0"/>
                                    </Grid>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>

                        <TextBox      
                            x:Name="addTextBox"   VerticalAlignment="Center" DockPanel.Dock="Right"
                            ToolTip="{x:Static props:Resources.New_task_name}" BorderBrush="{StaticResource TextBoxBackgroundBrush}"
                            Text="{Binding NewTaskName, UpdateSourceTrigger=PropertyChanged}"   
                            KExt:SpellCheck.IsEnabled="True"
                            HorizontalAlignment="Stretch" />

                    </DockPanel>


                </Grid>
            </Grid>
        </SF_Helpers:PanelLayout.Toolbar>

        <!-- CONTENT -->
        <SF_Helpers:PanelLayout.Content>
            <Grid x:Name="grid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>

                <DockPanel Grid.Column="0" Margin="0,0,10,0" >

                    <CheckBox Content="{x:Static props:Resources.show_all_items}" IsChecked="{Binding ShowAllItems}" DockPanel.Dock="Top"/>
                    


                    <ListBox                                            
                        SF_Helpers_Ext:ListSelectionBehavior.ClickSelection="True"                
                        SelectedItem="{Binding SelectedBacklogItem}"
                        DockPanel.Dock="Bottom"
                       Focusable="False"
                        ItemsSource="{Binding GroupedBacklogItems}"
                        ItemContainerStyle="{StaticResource FixesListBoxItem}"
                        SF_DD:DragDropHelper.OnDropCommand="{Binding ChangeTaskItemCommand}"
                        SF_DD:DragDropHelper.IsDragSource="False"
                        SF_DD:DragDropHelper.PositionDrop="False"
                        SF_DD:DragDropHelper.IsDropTarget="True"               
                        SF_DD:DragDropHelper.ShowInsertAdorner="False">
                        <ListBox.GroupStyle>
                            <GroupStyle>                                
                                <GroupStyle.HeaderTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding Name, StringFormat='{}Sprint {0}'}" Margin="0,10,0,5" >
                                            <TextBlock.Style>
                                                <Style TargetType="TextBlock" BasedOn="{StaticResource ItemGroupTextBlock}">
                                                    <Style.Triggers>
                                                        <Trigger Property="Text" Value="Sprint ">
                                                            <!--<Setter Property="TextBlock.Text" Value="{x:Static props:Resources.not_planned}"/>-->
                                                            <Setter Property="TextBlock.Visibility" Value="Hidden"/>
                                                        </Trigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </TextBlock.Style>
                                        </TextBlock>
                                    </DataTemplate>
                                </GroupStyle.HeaderTemplate>
                            </GroupStyle>
                        </ListBox.GroupStyle>
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Margin="0,5,0,5" ToolTip="{Binding Description}" ToolTipService.Placement="Right">
                                    
                                    <Image Style="{StaticResource BacklogItemStatusImage}" DataContext="{Binding Status}" Width="24" Height="24" VerticalAlignment="Top" />
                                    
                                    <TextBlock Text="{Binding BacklogItemNumber}" FontSize="{StaticResource SmallFontSize}" Width="20" TextAlignment="Right" />
                                    
                                    <StackPanel Orientation="Vertical" Margin="10,0,0,0">
                                        <TextBlock Text="{Binding Name}" FontSize="{StaticResource NormalFontSize}" TextWrapping="Wrap" Width="150" HorizontalAlignment="Left"/>
                                        <TextBlock>
                                        <Hyperlink Command="{Binding Model.CloseItemCommand, ElementName=thisView}" CommandParameter="{Binding .}">
                                            <TextBlock Text="{x:Static props:Resources.item_done}"/>
                                        </Hyperlink>
                                        <TextBlock.Style>
                                            <Style TargetType="TextBlock">
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding Status}" Value="2">
                                                        <Setter Property="Visibility" Value="Collapsed"/>
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding Status}" Value="3">
                                                        <Setter Property="Visibility" Value="Collapsed"/>
                                                    </DataTrigger>
                                                     <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}, Path=IsSelected}" Value="False">
                                                         <Setter Property="Visibility" Value="Collapsed"/>
                                                     </DataTrigger>                                  
                                                </Style.Triggers>
                                            </Style>
                                        </TextBlock.Style>
                                    </TextBlock>
                                    </StackPanel>
                                   
                                </StackPanel>
                               
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    
                    
                </DockPanel>

                <TextBlock                        
                        Grid.Column="1"  
                        HorizontalAlignment="Center" VerticalAlignment="Center"  Margin="0,100,0,0"                       
                        FontSize="60" Foreground="LightGray" Opacity="0.3" FontWeight="Bold"
                        Text="{Binding CurrentSprintLabel}"/>

                <Border Background="Transparent" Grid.Column="1" CornerRadius="5">
                    <ListBox  
                    x:Name="postItList"
                      
                        Focusable="False"
                    ItemsSource="{Binding FilteredTasksPostIt}"            
                    
                    ItemTemplate="{StaticResource PostItDataTemplate}"  
                    
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    HorizontalAlignment="Stretch" VerticalAlignment="Stretch"                    
                    
                    SF_Comp:CommandBehavior.RoutedEventName="MouseRightButtonDown"
                    SF_Comp:CommandBehavior.TheCommandToRun="{Binding CreateEmptyTaskCommand}"
                    
                                        
                    SF_DD:DragDropHelper.OnDropCommand="{Binding MoveTaskCommand}"
                    SF_DD:DragDropHelper.IsDragSource="True"
                    SF_DD:DragDropHelper.IsDropTarget="True"               
                    SF_DD:DragDropHelper.ShowInsertAdorner="False"
                    SF_DD:DragDropHelper.DragDropTemplate="{StaticResource PostItDataTemplate}">
                

                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <WrapPanel Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,25"   />
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                        <ListBox.GroupStyle>
                            <GroupStyle HidesIfEmpty="False">
                                <GroupStyle.Panel>
                                    <ItemsPanelTemplate>
                                        <UniformGrid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Columns="3" Rows="1"                                                      
                                         ScrollViewer.HorizontalScrollBarVisibility="Disabled" />
                                    </ItemsPanelTemplate>
                                </GroupStyle.Panel>
                                <GroupStyle.ContainerStyle>
                                    <Style TargetType="{x:Type GroupItem}">
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type GroupItem}">
                                                    <Grid Background="Transparent">
                                                        <Image DataContext="{Binding Name}" Style="{StaticResource WhiteBoardTitleImage}" Margin="0,3,0,0"/>
                                                        <ItemsPresenter Margin="0,30,0,0" Tag="{Binding Name}" />
                                                    </Grid>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </GroupStyle.ContainerStyle>
                            </GroupStyle>
                        </ListBox.GroupStyle>
                        <ListBox.ItemContainerStyle>
                            <Style BasedOn="{StaticResource NoHoverListBoxItem}" TargetType="{x:Type ListBoxItem}">                            
                                <Setter Property="SF_DD:DragDropHelper.IsDragAllowed" Value="{Binding CanEditThisTask}"/>
                            </Style>
                        </ListBox.ItemContainerStyle>                        
                    </ListBox>
                    <Border.Style>
                        <Style>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding ListMode}" Value="1">
                                    <Setter Property="Border.Visibility" Value="Collapsed"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Border.Style>
                </Border>
               

                <ListView 
                    x:Name="normalList"
                    Background="White"
                    Grid.Column="1"            
                    Margin="0,5,0,0"
                    
                    SelectionMode="Extended"
                
                    IsTabStop="False" Focusable="False"
                    SF_Helpers:ListViewColumnsExtension.Stretch="True"
                
                    SF_Helpers:ItemActivation.ActivationMode="Both"            
                    SF_Helpers:ItemActivation.TheCommandToRun="{Binding ShowDetailWindowCommand}"                                    
                                                     
                ItemsSource="{Binding FilteredTasksList}"            
                
                VirtualizingStackPanel.IsVirtualizing="True"
                VirtualizingStackPanel.VirtualizationMode="Recycling"
                ScrollViewer.IsDeferredScrollingEnabled="True"
                            
                ScrollViewer.VerticalScrollBarVisibility="Auto"
                ScrollViewer.HorizontalScrollBarVisibility="Disabled"            
                VerticalAlignment="Stretch">
                    
                    <ListView.ItemsPanel>
                        <ItemsPanelTemplate>
                            <VirtualizingStackPanel Background="White"/>
                        </ItemsPanelTemplate>
                    </ListView.ItemsPanel>
                    <ListView.View>
                        <GridView>
                            <!--<GridViewColumn Width="0" x:Name="selectionColumn">                                     
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                    
                                            <CheckBox IsChecked="{Binding IsSelected}" Content="" Width="24">
                                                <CheckBox.Style>
                                                    <Style BasedOn="{StaticResource {x:Type CheckBox}}" TargetType="CheckBox">
                                                        <Setter Property="Visibility" Value="Collapsed"/>
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding IsChecked, ElementName=selectionButton}" Value="True">
                                                                <Setter Property="Visibility" Value="Visible"/>
                                                            </DataTrigger>
                                                        </Style.Triggers>                                                                                                            
                                                </Style>
                                                </CheckBox.Style>
                                            </CheckBox>
                                    
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>-->
                            <GridViewColumn Header="{x:Static props:Resources.Done}" Width="50">                                
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <Grid HorizontalAlignment="Stretch">
                                            <ToggleButton IsChecked="{Binding IsFinished}" IsEnabled="{Binding CanEditThisTask}" HorizontalAlignment="Left">
                                                <ToggleButton.Style>
                                                    <Style BasedOn="{StaticResource CheckToggleButton}" TargetType="{x:Type ToggleButton}">
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding IsCanceled}" Value="True">
                                                                <Setter Property="Visibility" Value="Collapsed"/>
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                </ToggleButton.Style>
                                            </ToggleButton>
                                            <Image Style="{StaticResource IsTaskCanceledImage}" DataContext="{Binding IsCanceled}" Width="32" Height="32" HorizontalAlignment="Left"/>
                                        </Grid>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn Header="{x:Static props:Resources.Assignee}" Width="90">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <ComboBox                
                                            SF_Comp:CommandBehavior.RoutedEventName="SelectionChanged"
                                            SF_Comp:CommandBehavior.TheCommandToRun="{Binding ChangeTaskAssigneeCommand}"
                                            IsEnabled="{Binding CanChangeAssignee}"
                                            Style="{StaticResource TaskAssigneeComboBoxWithImage}"                                                                                     
                                            SelectedValuePath="MemberUId" SelectedValue="{Binding TaskAssigneeUId}"
                                            ItemsSource="{Binding ElementName=thisView, Path=Model.ProjectMembers, Converter={StaticResource TaskAssigneeCollectionConverter}}">
                                            <ComboBox.GroupStyle>
                                                <GroupStyle HidesIfEmpty="True" ContainerStyle="{StaticResource TaskAssigneeGroupStyle}"/>
                                            </ComboBox.GroupStyle>
                                        </ComboBox>                                        
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn Header="{x:Static props:Resources.Task}">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>                
                                        <Grid>
                                            <TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Height="16">
                                                <Image
                                                    DataContext="{Binding Task.TaskType}" VerticalAlignment="Center"
                                                    Style="{StaticResource TaskTypeOnPostItImage}"/>
                                                <TextBlock Text="{Binding Task.TaskNumber}" Foreground="{StaticResource SubTextBrush}" FontSize="{StaticResource SmallFontSize}"  VerticalAlignment="Center"/>    
                                            </TextBlock>
                                            <TextBlock TextWrapping="Wrap" VerticalAlignment="Top" Padding="0,0,50,0" >
                                                <Hyperlink
                                                    Command="{Binding Model.ShowDetailWindowCommand, ElementName=thisView}"
                                                    CommandParameter="{Binding .}">
                                                    <Run Text="{Binding Task.TaskName}" FontSize="{StaticResource BigFontSize}"/>        
                                                </Hyperlink>
                                            </TextBlock>
                                            <Image DataContext="{Binding HasArtifact}" Style="{StaticResource HasArtifactImage}" HorizontalAlignment="Right"/>
                                            <TextBlock VerticalAlignment="Bottom" Foreground="{StaticResource SubTextBrush}" FontSize="{StaticResource NormalFontSize}">
                                                <Run Text="{Binding Task.StartDate, Converter={StaticResource ContextDateConverter}, StringFormat={x:Static props:Resources.from_X}}"/>
                                                <Run Text="{Binding Task.EndDate, Converter={StaticResource ContextDateConverter}, StringFormat={x:Static props:Resources.to_X}}"/>
                                                <Run Text="{Binding TaskRole.RoleShortName, StringFormat='{}({0})'}"/>
                                                <TextBlock Background="Yellow" Text="{x:Static props:Resources.role_not_defined}">
                                                    <TextBlock.Style>
                                                        <Style>
                                                            <Setter Property="TextBlock.Visibility" Value="Collapsed"/>
                                                            <Style.Triggers>
                                                                <DataTrigger Binding="{Binding TaskRole}" Value="{x:Null}">
                                                                    <Setter Property="TextBlock.Visibility" Value="Visible"/>
                                                                </DataTrigger>
                                                            </Style.Triggers>
                                                        </Style>
                                                    </TextBlock.Style>
                                                </TextBlock>
                                            </TextBlock>
                                            
                                        </Grid>
                                            
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>
                          
                            <!--<GridViewColumn Header="{x:Static props:Resources.Start}" Width="90">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock 
                                            Foreground="{StaticResource SubTextBrush}" FontSize="{StaticResource NormalFontSize}" 
                                            Text="{Binding Task.StartDate, Converter={StaticResource ContextDateConverter}, StringFormat={x:Static props:Resources.from_X}}" VerticalAlignment="Center" TextAlignment="Center"/>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>
                            <GridViewColumn Header="{x:Static props:Resources.End}" Width="90">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock 
                                            Foreground="{StaticResource SubTextBrush}" FontSize="{StaticResource NormalFontSize}" 
                                            Text="{Binding Task.EndDate, Converter={StaticResource ContextDateConverter}, StringFormat={x:Static props:Resources.to_X}}" VerticalAlignment="Center" TextAlignment="Center"/>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>-->                            
                            <GridViewColumn Header="{x:Static props:Resources.Planned}" Width="65">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBox
                                                VerticalAlignment="Center"
                                                SF_Helpers_Ext:TextBoxExtension.AutoSelectOnFocus="True"
                                                SF_Helpers_Ext:TextBoxExtension.NumericJumper="0.5" Margin="0"
                                                SF_Comp:CommandBehavior.RoutedEventName="LostFocus"
                                                SF_Comp:CommandBehavior.TheCommandToRun="{Binding ChangeEffectiveHoursCommand}" 
                                                Width="50" Text="{Binding Task.EffectiveHours, UpdateSourceTrigger=PropertyChanged}" MaxLength="4" Background="Transparent" TextAlignment="Right" IsEnabled="{Binding CanEditThisTask}"/>                                        
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>
                            <GridViewColumn Header="{x:Static props:Resources.Real}" Width="110">
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
                                            <TextBlock Text="{x:Static props:Resources.of}" VerticalAlignment="Center" />
                                            <TextBox 
                                            SF_Helpers_Ext:TextBoxExtension.AutoSelectOnFocus="True"
                                            SF_Helpers_Ext:TextBoxExtension.NumericJumper="0.5"
                                            SF_Comp:CommandBehavior.RoutedEventName="LostFocus"
                                            SF_Comp:CommandBehavior.TheCommandToRun="{Binding ChangePlannedHoursCommand}" Width="50" VerticalAlignment="Center"
                                        Text="{Binding Task.PlannedHours, UpdateSourceTrigger=PropertyChanged}" MaxLength="4" Background="Transparent" TextAlignment="Right" IsEnabled="{Binding CanEditThisTask}"/>
                                            <TextBlock Text="{x:Static props:Resources.hrs}" VerticalAlignment="Center" Margin="3,0,0,0"/>                                           
                                        </StackPanel>
                                        
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>                            
                        </GridView>
                    </ListView.View>
                    <ListView.Style>
                        <Style BasedOn="{StaticResource ListViewNoHeader}" TargetType="{x:Type ListView}">
                            <Setter Property="ListView.SelectionMode" Value="Single"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding ListMode}" Value="0">
                                    <Setter Property="ListBox.Visibility" Value="Collapsed"/>
                                </DataTrigger>                                                                
                                <!--<DataTrigger Binding="{Binding IsChecked, ElementName=selectionButton}" Value="True">
                                    <Setter Property="ListView.SelectionMode" Value="Multiple"/>
                                </DataTrigger>-->
                            </Style.Triggers>
                        </Style>
                    </ListView.Style>                    
                </ListView>

                <Border Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,20,20,0">
                    <DockPanel>
                        <StackPanel DockPanel.Dock="Left">
                            <TextBlock 
                                Foreground="Black"
                                Text="{Binding SelectedTasksCount}" FontSize="{StaticResource ReallyBigFontSize}" 
                                HorizontalAlignment="Center" FontWeight="Bold"/>
                            <TextBlock 
                                Foreground="Black"
                                Text="{x:Static props:Resources.Tasks}" HorizontalAlignment="Center"/>
                        </StackPanel>
                        <StackPanel DockPanel.Dock="Right" Margin="20,0,0,0" VerticalAlignment="Center">
                            <TextBlock Text="{Binding SelectedTasksPlannedHours, StringFormat={x:Static props:Resources.N_planned}}"/>
                            <TextBlock Text="{Binding SelectedTasksEffectiveHours, StringFormat={x:Static props:Resources.N_spent}}"/>
                            <TextBlock Text="{x:Static props:Resources.copytasks_tooltip}" FontSize="{StaticResource SmallFontSize}" FontStyle="Italic" Foreground="{StaticResource LabelBrush}"/>
                        </StackPanel>
                        
                    </DockPanel>
                    <Border.Style>
                        <Style BasedOn="{StaticResource AlertBorder}" TargetType="Border">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding SelectedTasksCount}" Value="0">
                                    <Setter Property="Visibility" Value="Collapsed"/>
                                </DataTrigger>
                                <DataTrigger Binding="{Binding SelectedTasksCount}" Value="1">
                                    <Setter Property="Visibility" Value="Collapsed"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Border.Style>
                </Border>

                

                <ContentControl  Grid.Column="1"                                                                       
                        Style="{StaticResource LoadingAnimationContent}"/>


                <TextBlock Grid.Column="1" Text="{x:Static props:Resources.Please_select_a_backlog_item}" VerticalAlignment="Center" HorizontalAlignment="Center">
                    <TextBlock.Style>
                        <Style>
                            <Setter Property="TextBlock.Visibility" Value="Collapsed"/>
                            <Style.Triggers>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding ListMode}" Value="1"/>
                                        <Condition Binding="{Binding SelectedBacklogItem}" Value="{x:Null}"/>
                                        <Condition Binding="{Binding FilterTag}" Value="{x:Null}"/>
                                    </MultiDataTrigger.Conditions>
                                    <Setter Property="TextBlock.Visibility" Value="Visible"/>
                                </MultiDataTrigger>
                            </Style.Triggers>
                        </Style>
                    </TextBlock.Style>
                </TextBlock>

                <StackPanel Grid.Column="1"
                            Orientation="Horizontal" HorizontalAlignment="Left" Margin="20,100,0,0" 
                            VerticalAlignment="Top" IsHitTestVisible="False">
                    <Image Source="/Images/information.png"  Margin="0,0,10,0" Width="32" Height="32"/>
                    <TextBlock Text="{x:Static props:Resources.add_task_tooltip}" TextWrapping="Wrap" Width="200"/>
                    <StackPanel.Style>
                        <Style>
                            <Setter Property="TextBlock.Visibility" Value="Collapsed"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding ShowAddTaskToolTip}" Value="True">
                                    <Setter Property="TextBlock.Visibility" Value="Visible"/>
                                </DataTrigger>                                
                            </Style.Triggers>
                        </Style>
                    </StackPanel.Style>
                </StackPanel>


                <TextBox 
                    Grid.ColumnSpan="2"
                    x:Name="searchTextBox"                    
                    Text="{Binding SearchFilterText, UpdateSourceTrigger=PropertyChanged}"
                    Style="{StaticResource SearchTextBox}"/>


            </Grid>
        </SF_Helpers:PanelLayout.Content>
    </SF_Helpers:PanelLayout>

    
</UserControl>
